package com.stone.starter.redis.config.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * redis 缓存配置属性
 *
 * @author Mr_wenpan@163.com 2021-07-23
 */
@ConfigurationProperties(
        prefix = "stone.redis.cache"
)
public class RedisCacheProperties {
    private String host;
    private int port;
    private String nodes;
    private boolean clusterMode;
    private String master;
    private String password;
    private long timeoutMillis;
    private int dbIndex;
    private int poolMinIdle;
    private int poolMaxIdle;
    private long poolMaxWaitMillis;

    public RedisCacheProperties() {
        clusterMode = false;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public String getNodes() {
        return nodes;
    }

    public void setNodes(String nodes) {
        this.nodes = nodes;
    }

    public boolean getClusterMode() {
        return clusterMode;
    }

    public void setClusterMode(boolean clusterMode) {
        this.clusterMode = clusterMode;
    }

    public String getMaster() {
        return master;
    }

    public void setMaster(String master) {
        this.master = master;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public long getTimeoutMillis() {
        return timeoutMillis;
    }

    public void setTimeoutMillis(long timeoutMillis) {
        this.timeoutMillis = timeoutMillis;
    }

    public int getDbIndex() {
        return dbIndex;
    }

    public void setDbIndex(int dbIndex) {
        this.dbIndex = dbIndex;
    }

    public int getPoolMinIdle() {
        return poolMinIdle;
    }

    public void setPoolMinIdle(int poolMinIdle) {
        this.poolMinIdle = poolMinIdle;
    }

    public int getPoolMaxIdle() {
        return poolMaxIdle;
    }

    public void setPoolMaxIdle(int poolMaxIdle) {
        this.poolMaxIdle = poolMaxIdle;
    }

    public long getPoolMaxWaitMillis() {
        return poolMaxWaitMillis;
    }

    public void setPoolMaxWaitMillis(long poolMaxWaitMillis) {
        this.poolMaxWaitMillis = poolMaxWaitMillis;
    }
}
